﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace SharpCommon.ORM.EntityManager
{
    public interface EntityManager
    {
        IDbTransaction Transaction { get; set; }
        List<T> FindAll<T>() where T : new();
        List<T> FindBySql<T>(string strSql) where T : new();
        List<T> FindById<T>(object id) where T : new();
        int Save<T>(T entity);
        int Update<T>(T entity);
        int Remove<T>(T entity);
        int Remove<T>(object id) where T : new();
    }
}
